package com.netty.source;

import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * EventLoop 源码分析
 *
 * @author xl-9527
 */
public class TestEventLoop {

    private static final Logger log = LoggerFactory.getLogger(TestEventLoop.class);

    public static void main(String[] args) {
        EventLoopGroup loopGroup = null;
        try {
            loopGroup = new NioEventLoopGroup();
            loopGroup.next().execute(() -> {
                log.info("hello xl-9527");
            });
        } catch (Exception e) {
            throw new RuntimeException(e);
        } finally {
            loopGroup.shutdownGracefully();
        }
    }
}
